home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / tos / util / utlsrc37.zoo / Makefile.cross < prev    next >
Encoding:
Makefile  |  1993-06-30  |  2.7 KB  |  116 lines

  1. #
  2. # Makefile for utils for Atari Cross Compilers
  3. # - adjust CROSSDIR below for your setup
  4. # - define CC to be the path to your hosts C compiler (gcc preferred except on sparc
  5. #        on the sparc cc is the preferred host C compiler).
  6. # - If you are going to run the cross linker on a machine that aligns structures
  7. #   at longword boundaries (machines such as Sun-Sparc, Convex etc) add
  8. #   -DWORD_ALIGNED to CFLAGS
  9. # - If you are going to run the cross linker on a machine that has the opposite
  10. #    byte sex to a m68k, ie a little endian host, the add -DBYTE_SWAP to CFLAGS.
  11. #
  12. #
  13. #   ************** IMPORTANT note for NeXT with OS 3.0 or higher **********
  14. #
  15. # Cross-compiling on NeXT with OS 3.0 and higher:
  16. # ----------------------------------------------
  17. # For this host define, in Makefile.cross,
  18. # HOSTINC = /usr/include/ansi -I/usr/include/bsd
  19. # making search path for include files into "-I. -I$(HOSTINC) -I$(CROSSINC)".
  20. # Also, because file /usr/include/bsd/stab.h does exist and we need
  21. # another one, provide a link from CROSSINC/stab.h to stab.h in the current
  22. # directory so ST version will be picked up first.
  23. #
  24. #   ************************************************************************
  25.  
  26. CROSSDIR = /share/gcc-cross/atari
  27. CROSSBIN = $(CROSSDIR)/bin
  28. CROSSLIB = $(CROSSDIR)/lib
  29. CROSSINC = $(CROSSDIR)/include
  30.  
  31. # Host GCC
  32. CC=/usr/local/bin/gcc
  33. # Host include dir
  34. #HOSTINC = /usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.2.2/include
  35. HOSTINC = /usr/include
  36.  
  37. CFLAGS = -O2 -I. -I$(HOSTINC) -I$(CROSSINC) -DCROSSATARI=1 \
  38. -DCROSSDIR=\"$(CROSSDIR)\" -DCROSSLIB=\"$(CROSSLIB)\" -DWORD_ALIGNED=1
  39.  
  40. ALL = ld sym-ld nm car size size68 tnm xstrip fixstk printstk toglclr
  41.  
  42. all: $(ALL)
  43. #
  44. # the 'regular' linker, produces atari executables
  45. #
  46. ld : ld.o cplusdem.o
  47.     $(CC) -o ld ld.o cplusdem.o
  48.  
  49. #
  50. # the 'other' linker, produces atari gdb compat symb files
  51. #
  52. sym-ld : sym-ld.o  cplusdem.o
  53.     $(CC) -o sym-ld sym-ld.o cplusdem.o
  54.  
  55. #
  56. # obj file describer?
  57. #
  58. nm : nm.o cplusdem.o
  59.     $(CC) -o nm nm.o cplusdem.o 
  60.  
  61. # Object file sizes
  62. #
  63. size: size.o
  64.     $(CC) -o size size.o
  65.  
  66. #
  67. # ar - archiver/librarian
  68. #
  69. car : ar.o
  70.     $(CC) -o car ar.o
  71.  
  72. #
  73. # TOS executable file sizes
  74. #
  75. size68: size68.o
  76.     $(CC) -o size68 size68.o
  77.  
  78. #
  79. # TOS format symbol dumper
  80. #
  81. tnm: cnm.o
  82.     $(CC) -o tnm cnm.o
  83.  
  84. #
  85. # TOS format symbol table stripper
  86. #
  87. xstrip: strip.o
  88.     $(CC) -o xstrip strip.o
  89.  
  90. #
  91. # TOS format flags manipulator
  92. #
  93. toglclr: toglclr.o
  94.     $(CC) -o toglclr toglclr.o
  95.  
  96. install: $(ALL)
  97.     cp ld $(CROSSLIB)/gcc-ld
  98.     cp nm $(CROSSBIN)/cnm
  99.     cp car $(CROSSBIN)/car
  100.     cp size $(CROSSBIN)/csize
  101.     cp size68 $(CROSSBIN)/csize68
  102.     cp tnm $(CROSSBIN)/tnm
  103.     cp xstrip $(CROSSBIN)/xstrip
  104.     cp sym-ld $(CROSSBIN)/sym-ld
  105.     cp  fixstk printstk $(CROSSBIN)
  106.     cp  toglclr $(CROSSBIN)
  107.  
  108. clean:
  109.     rm -f *.o
  110.  
  111. realclean: clean
  112.     rm -f $(ALL) core report
  113.